package com.example.bijidemo.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.bijidemo.common.R;
import com.example.bijidemo.entity.RenwuJincheng;
import com.example.bijidemo.service.RenwuJinchengService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/jincheng")
public class RenwuJinchengController {
    @Autowired
    RenwuJinchengService renwuJinchengService;
    @GetMapping
    public R<List<RenwuJincheng>>  getJincheng(){
        LambdaQueryWrapper<RenwuJincheng> a=new LambdaQueryWrapper<>();
        a.select();
        List<RenwuJincheng> list = renwuJinchengService.list(a);
        System.out.println(list);
        return R.success(list);


    }
}
